WIP: locally scope CSS to '.gutenberg' class #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An effort to address #63
This is still a WORK IN PROGRESS but I thought I'd share where I'm at in case a) I never finish or b) somebody has a suggestion.
Right now, everything is locally scoped except some stray 'html' and 'body' references. I'm comparing the output with the example and eyeballing it to make sure it matches. Right now, I can detect one flaw, and that's the
h1
font-size is off (45px instead of 40px).One potential issue is the 'rem' usage. Since
rem
depends on the font-size on thehtml
element, and since setting the font-size on thehtml
element affects the entire page, it could conflict with the CSS of existing sites. So I've added an option to disable the 'rem' output and only use the pixels.I'd like to go further, and empower users of CSS-in-JS frameworks to apply the styles from individual modules (say,
_quote.scss
) to their own components, rather than hard coding the CSS to the<blockquote>
element. However, I'm not sure what the best way to do that is yet.I'm building a WYSIWYG editor using Slate by the way. I wanted it to look nice, which is how I stumbled across Gutenberg.